package com.zombie.logic.object.ai.action;

import com.zombie.logic.object.LiveObject;
import com.zombie.logic.object.ai.AI;
import com.zombie.state.GameState;

public class Action implements Cloneable {

	public boolean done = false;
	public boolean interrupted = false;
	public ActionType type = ActionType.WAIT;
	public long endTime = -1;
	
	public static final Action DEFAULT_ACTION = new Action();

	public Action copy() {
		try {
			return (Action) clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return null;
	}
	
	public void checkCondition(AI ai, LiveObject owner){
		if (endTime != -1 && endTime < GameState.time)
			done = true;
	}
}
